﻿/*=================================================================
* 版权信息：Copyright (C) 2005-2011 捷点科技 All Rights Reserved.
* 文件名称：CNVP_Menu.cs
* 创建标识：曾乃强 15158756652 2011-03-16 02:03:19
* 修改标识：
* 功能描述：
===================================================================*/
using System;
using System.Collections.Generic;
using System.Text;
using System.Data;

namespace CNVP.JShop.BLL 
{
    public class CNVP_Menu
    {
        DAL.CNVP_Menu dal = new DAL.CNVP_Menu();
        
        #region BLL
        #region 添加
        /// <summary>
        /// 添加
        /// </summary>
        public int Add_CNVP_Menu(Model.CNVP_Menu obj)
        {
            return dal.Insert(obj);
        }
        #endregion

        #region 修改
        /// <summary>
        /// 修改
        /// </summary>
        public int Update_CNVP_Menu(Model.CNVP_Menu obj)
        {
            return dal.Update(obj);
        }
        #endregion

        #region 删除
        /// <summary>
        /// 删除
        /// </summary>
        public int Delete_CNVP_Menu(Model.CNVP_Menu obj)
        {
            return dal.Delete(obj);
        }

        /// <summary>
        /// 删除,生成列的主键列构成的参数列表
        /// </summary>
        public int Delete_CNVP_Menu(int ID)
        {
            return this.Delete_CNVP_Menu(new Model.CNVP_Menu()
            {

                ID = ID
            });
        }
        #endregion 

        /// <summary>
        /// 查看单个
        /// </summary>
        public Model.CNVP_Menu GetSingle_CNVP_MenuById(int ID)
        {
            return dal.LoadById(ID);
        }
        /// <summary>
        /// 查看全部
        /// </summary>
        public List<Model.CNVP_Menu> GetAll_CNVP_Menu()
        {
            return this.GetAll_CNVP_Menu("");
        }

        /// <summary>
        /// 查看全部,带sqlWhere
        /// </summary>
        public List<Model.CNVP_Menu> GetAll_CNVP_Menu(string sqlWhere)
        {
            return dal.LoadAll(sqlWhere);
        }
        
        #endregion

        /// <summary>
        /// 查看全部，Power
        /// </summary>
        public List<Model.CNVP_Menu> GetAllPower_CNVP_Menu(int Depth, int AdminRoleID)
        {
            return dal.LoadAllPower(Depth, AdminRoleID);
        }

        public DataTable GetAll_CNVP_Menu2(string sqlWhere)
        {
            return dal.LoadAll2(sqlWhere);
        }

    }
}

